 #ifndef __LIGHT_H__
#define __LIGHT_H__

#include "Color.h"
#include "Object.h"

class Matrix3;
class Vector3;

class Light::public Object
{
public:
	virtual  ~Light();

	enum Type
	{
		GL_AMBIENT,
		GL_DIRECTIONAL,
		GL_POINT,
		GL_SPOT,
		LT_QUANTITY
	};

	virtual Type get_type() const = 0;

	Color& ambient();
	Color& constant();
	Color& linear();
	Color& quadratic();

	bool& on();
	Real& intensity();

	virtual void compute_diffuse( const Matrix3& world_rotate,
		const Vector3& world_translate, Real world_scale,
		const Vector3& vertex, const Vector3* normal,
		unsigned int num_lights, const bool* visible,
		Color* diffuse ) = 0;

	virtual void compute_specular( const Matrix3& world_rotate,
		const Vector3& world_translate, Real world_scale,
		const Vector3& vertex, const Vector* normal,
		unsigned int num_lights const bool* visible,
		const Vector3& camera_model_location, Color* specular ) = 0;

protected:
	Light();

	Color m_ambient;
	Color m_diffuse;
	Color m_specular;
	Color m_constant;
	Color m_linear;
	Color m_quadratic;
	Color m_intensity;
	bool m_attenuate;
	bool m_on;
};

#include "Light.inl"

#endif

}